package com.nattakute.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nattakute.dao.TimeTableDAO;
import com.nattakute.model.Timetable;
import com.nattakute.service.TimeTableService;

@Service("timeTableService")
@Transactional
public class TimeTableServicesImpl implements TimeTableService{

	@Autowired
	private TimeTableDAO timeTableDAO;
	
	
	@Transactional
	public List<Timetable> getTimeTable() {
		return timeTableDAO.getTimeTable();
	}

	
	@Transactional
	public Timetable getTimeTableById(Integer id) {
		return timeTableDAO.getTimeTableById(id);
	}

	
	@Transactional
	public Boolean addTimeTable(Timetable timeTable) {
		// TODO Auto-generated method stub
		return timeTableDAO.addTimeTable(timeTable);
	}

	
	@Transactional
	public Boolean deleteTimeTable(Timetable timeTable) {
		// TODO Auto-generated method stub
		return timeTableDAO.deleteTimeTable(timeTable);
	}

	
	@Transactional
	public Boolean updateTimeTable(Timetable timeTable) {
		// TODO Auto-generated method stub
		return timeTableDAO.updateTimeTable(timeTable);
	}

	
	@Transactional
	public List<Timetable> listTimeTableByClass(String classId) {
		// TODO Auto-generated method stub
		return timeTableDAO.listTimeTableByClass(classId);
	}

	
	@Transactional
	public List<Timetable> showReport() {
		// TODO Auto-generated method stub
		return timeTableDAO.showReport();
	}


	public void setTimeTableDAO(TimeTableDAO timeTableDAO) {
		this.timeTableDAO = timeTableDAO;
	}
	
	

}
